local sanshi = fk.CreateSkill{
  name = "swis__sanshi",
  tags = {Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["swis__sanshi"] = "散士",
  [":swis__sanshi"] = "锁定技，游戏开始时，将一副扑克牌洗入牌堆。"
}

sanshi:addEffect(fk.GameStart, {
  anim_type = "special",
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(sanshi.name)
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    for _, suit in ipairs{ Card.Diamond, Card.Club, Card.Heart, Card.Spade } do
      for number = 1, 13 do
        local poker = room:printCard("poker", suit, number)
        local id = poker.id
        table.removeOne(room.void, id)
        table.insert(room.draw_pile, math.random(1, #room.draw_pile), id)
        room:setCardArea(id, Card.DrawPile)
      end
    end
    room:syncDrawPile()
    room:doBroadcastNotify("UpdateDrawPile", tostring(#room.draw_pile))
  end
})

return sanshi